package fun.easycode.jointblock.manager;

import fun.easycode.jointblock.common.DapengConst;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(
        name = "FavoriteServiceClient",
        url = "http://api.cd0755d8e9df9425a8d1653d7ac3a863d.cn-beijing.alicontainer.com/favorite-api")
public interface FavoriteClient {

    /**
     * 查询是否收藏
     *
     * @param userId :当前操作人
     * @param topicIds :主体ID
     * @param topicType :主体类型
     * @return 主体ID:是否收藏
     * @author qifengs
     * @date 2020/5/15
     **/
    @GetMapping("v2/favorites/validation")
    ResponseEntity<Map<String, Boolean>> getValidations(
            @RequestHeader(DapengConst.CURRENT_USER_ID_HEADER) String userId,
            @RequestParam("topicIds") List<String> topicIds, @RequestParam String topicType);
}
